package com.rhb.af.web.screen.bean;

public class Function {
	String name;
	String para;
	String script;
	
	public Function(){
		name = "";
		para = "";
		script = "";		
	}
	
	public Function(Function function){
		name = new String(function.getName());
		para = new String(function.getPara());
		script = new String(function.getScript());		
	}
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getPara() {
		return para;
	}
	public void setPara(String para) {
		this.para = para;
	}
	public String getScript() {
		return script;
	}
	public void setScript(String script) {
		this.script = script;
	}
	
	public String toString(){
		StringBuffer sb = new StringBuffer();
		if(name!=null && para!=null && !"".equals(name) && !"".equals(para)){
			sb.append(" function " + name + "(");
			sb.append(para);
			sb.append("){");
			sb.append(script);
			sb.append("}");
		}else{
			sb.append(" " + script);
		}
		return sb.toString();
	}
}
